Prizm Content Connect
How to Add Scrolling Support for Firefox

In order to add mouse scrolling support for the Firefox browser, subscribe to the DOMMouseScroll event. Use the following JavaScript code to add mouse scrolling support to the viewer for Firefox:

JavaScript Example
Copy Code
if(window.addEventListener) {
          var eventType = (navigator.userAgent.indexOf('Firefox') !=-1) ? "DOMMouseScroll" : "mousewheel";
          window.addEventListener(eventType, handleMouseScroll, false);
}
function handleMouseScroll (event) {
            var app = document.getElementById("ViewerEnterpriseAnnotation");
            var edelta = (navigator.userAgent.indexOf('Firefox') !=-1) ? -event.detail : event.wheelDelta/40;                                   
            var o = {x: event.screenX, y: event.screenY, delta: edelta, ctrlKey: event.ctrlKey, altKey: event.altKey, shiftKey: event.shiftKey}
            app.handle MouseScroll (o);
}

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback